<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" type="image/x-icon" href="static/login.png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="referrer" content="no-referrer" />
  <title>vue3</title>
</head>

<body onresize="handleWindowResize()">
  <div id="app"></div>
  <script type="module" src="/src/main.ts"></script>
  <script src="https://cdn.tiny.cloud/1/vschitp3c61vny5djnbxh7lahu0nues8y5rneppp3c8jgwko/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
  <!-- <script src="//cdn.jsdelivr.net/npm/@element-plus/icons-vue"></script> -->
</body>

</html>
<script>
  //限制360点击backspace返回页面
  document.onkeydown = function (e) {
    var ev = e || window.event; //获取event对象
    var obj = ev.target || ev.srcElement; //获取事件源
    var t = obj.type || obj.getAttribute("type"); //获取事件源类型
    //获取作为判断条件的事件类型
    var vReadOnly = obj.getAttribute("readonly");
    var vEnabled = obj.getAttribute("enabled");
    //处理null值情况
    vReadOnly = vReadOnly == null ? false : vReadOnly;
    vEnabled = vEnabled == null ? true : vEnabled;
    //当敲Backspace键时，事件源类型为密码或单行、多行文本的，
    //并且readonly属性为true或enabled属性为false的，则退格键失效
    var flag1 =
      ev.keyCode == 8 &&
        (t == "password" || t == "text" || t == "textarea") &&
        (vReadOnly == true || vEnabled != true)
        ? true
        : false;

    //当敲Backspace键时，事件源类型非密码或单行、多行文本的，则退格键失效
    var flag2 =
      ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea"
        ? true
        : false;
    //判断
    if (flag2) {
      return false;
    }
    if (flag1) {
      return false;
    }
  };

  document.addEventListener('mousewheel', function (e) {

 e = e || window.event;

 if ((e.wheelDelta && event.ctrlKey) || e.detail) {

   event.preventDefault();

 }

}, {

 capture: false,

 passive: false

});

document.addEventListener('keydown', function (event) {
 if ((event.ctrlKey === true || event.metaKey === true)
   && (event.keyCode === 61 || event.keyCode === 107
     || event.keyCode === 173 || event.keyCode === 109
     || event.keyCode === 187 || event.keyCode === 189)) {
   event.preventDefault();

 }

}, false);

</script>
<style>
  body,
  html {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
  }
</style>
